package com.xk857.school.controller.pub;


import com.xk857.school.req.TourismApplyREQ;
import com.xk857.school.service.ITourismUserService;
import com.xk857.util.base.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 用户旅游中间表 前端控制器
 * </p>
 *
 * @author CV大魔王
 * @since 2021-05-03
 */
@Api(value = "组团报名接口(公开)", tags = "组团报名接口(公开)")
@RestController
@RequestMapping("/pub/tourism/user")
public class PubTourismUserController {


    @Autowired
    private ITourismUserService tourismUserService;

    @ApiOperation("根据组团id查询报名信息")
    @GetMapping("/{id}")
    public Result searchByTourismId(@PathVariable String id) {
        return tourismUserService.searchByTourismId(id);
    }

    @ApiOperation("根据组团id查询报名人数")
    @GetMapping("/{id}/count")
    public Result searchCountByTourismId(@PathVariable String id) {
        return tourismUserService.searchCountByTourismId(id);
    }

}
